n = 30;

method_name = {'rdt','nmf',...
               'rs_rdt', 'rs_nmf', ...
               'fs_rdt', 'fs_nmf', ...
               'knn', 'sc' };
           
pick_dim = 15;

visual_id = [1 7];
avg_id = [2 3];
color = {'r','b'};
           
% method_cand = [1 2 7];
% 
% for i = 1:length(method_cand)
%     for i = 1:3
%     end
% end

hold off

method_cand = [ 1 2 7 8];

feat_str = '159';

for method_id = method_cand
    
    score_record{method_id} = zeros( 3, n+1);
    
    for i = 0:n    
        fname = ['./vali_result/vali_exp_sel_'...
                num2str(i) ...
                '_' method_name{method_id} '_feat' ...
                feat_str ...
                '_on_ZO'];
        try
            load(fname)
            
            for k = 1:length(vali)
                score_record{method_id}(k,i+1) = vali{k}.act_F_res(19);
            end
        catch
            
        end
    end
end



%get full size baseline


for method_id = method_cand
    
    full_size_record{method_id} = 0;
    fname = ['./vali_result/vali_'...
                method_name{method_id} '_feat' ...
                feat_str '_on_ZO'];
    try
        load(fname)
        for k = 1:length(vali)
            full_size_record{method_id}(k) = vali{k}.act_F_res(19);
        end
    catch
    end
                
end


hold off

clear legend_name

for j = 1:length(visual_id)
    
    i = visual_id(j);    
    
    legend_name{j} = method_name{i};
    
    legend_name{j}( find(legend_name{j}=='_') ) = ' ';
    
    visual_y = mean(score_record{i}(avg_id,:));
    visual_y(visual_y<0.10) = NaN;
    
    h = plot( 0:n, visual_y,'LineWidth',2);
    set(h,'color',color{j});
    hold on
    
    
    
end



legend(legend_name{1},legend_name{2})

for j = 1:length(visual_id)
    
    i = visual_id(j);    
    h = plot( 0:n, ones(1,n+1) * mean( full_size_record{i}(avg_id)),...
              '--','LineWidth',2);
    set(h,'color',color{j});
end

ylim([.805 .845])
xlim([-.5 15.5])
grid on

set(gca,'FontSize',13)

xlabel( 'Num of Probe' ,'FontSize',14)
ylabel( 'AVG F_1 on Datasets' ,'FontSize',14)